 /**
* 比较版本号的大小，如果curV 大于 reqV，则返回true，否则返回false
* @param {String} curV
* @param {String} reqV
*/
export const VersionCheck = (curV, reqV) => {
    var arr1 = curV.toString().split('.');
    var arr2 = reqV.toString().split('.');
    //将两个版本号拆成数字
    var maxL = Math.max(arr1.length, arr2.length);
    var pos = 0; //当前比较位
    var diff = 0; //当前为位比较是否相等
    var flag = false;
    //逐个比较如果当前位相等则继续比较下一位
    while (pos < maxL) {
        diff = parseInt(arr1[pos]) - (parseInt(arr2[pos]) || 0);
        if (diff == 0) {
            pos++;
            continue;
        } else if (diff > 0) {
            flag = true;
            break;
        } else {
            flag = false;
            break;
        }
    }
    return flag;
}
